async function defineComponentProps() {
  let compId;
  try {
    compId = VueElement.id;
  } catch (e) {
    compId = "map";
  }
  TempSources.compId = compId;
  const componentProps = {
    threeModeEnable: true,
  };
  componentProps.mapInfo = {
    dataType: 1,
    mapName: "广州市",
    url: "",
    mapCode: "440100",
  };
  componentProps.mapType = "threeMap";
  TempSources.compId = compId;
  TempSources.timer = null;
  TempSources.geoJson = null;
  TempSources.eventData = null;
  TempSources.actions = [
    "click",
    "dblclick",
    "mousedown",
    // "mousemove",
    "mouseup",
    // "mouseover",
    "mouseout",
    "globalout",
    // "contextmenu",
  ];

  var series = [
    {
      type: "map3D",
      map: compId,
      // 设置为透明
      itemStyle: {
        color: [1, 1, 1, 0],
      },
      emphasis: {
        itemStyle: {
          color: [1, 1, 1, 0],
        },
      },
      viewControl: {
        beta: 45, //x轴旋转
        alpha: 45, //Y轴旋转
      },
    },
  ];

  option = {
    background: "transparent",
    tooltip: {
      trigger: "item",
      formatter: function (params) {
        if (params.seriesType == "bar3D") {
          return [
            params.seriesName,
            params.name + "：" + params.value[2] + (params.value[3] || ""),
          ].join("<br />");
        }
      },
    },
    geo3D: {
      show: true,
      map: compId,
      top: -120,
      viewControl: {
        beta: 0, //x轴旋转
        alpha: 40, //Y轴旋转
        distance: 190,
        panMouseButton: "left", //平移操作使用的鼠标按键
        rotateMouseButton: "right", //旋转操作使用的鼠标按键
      },
      // 真实感材质相关配置 shading: 'realistic'时有效
      realisticMaterial: {
        detailTexture: COMP_DIR + "/map/detail.webp", // 纹理贴图
        textureTiling: 1, // 纹理平铺，1是拉伸，数字表示纹理平铺次数
        roughness: 1, // 材质粗糙度，0完全光滑，1完全粗糙
        metalness: 0, // 0材质是非金属 ，1金属
        roughnessAdjust: 0,
      },
      light: {
        main: {
          color: "rgba(255,255,255,1)",
          intensity: 1,
          // shadow: false,
          shadow: true, // 开启阴影
          shadowQuality: "ultra", // 阴影质量
          // 主光源设置
          //  color: '#ff0000', // 红色光源
          intensity: 1.2, // 光源强度
        },
        ambient: {
          // 环境光设置
          color: "rgba(0,0,0,1)",
          intensity: 0.1,
        },
      },
      itemStyle: {
        // color: "#4D96FA",
        borderWidth: 2,
        borderColor: "rgba(255,255,255,1)",
        //  borderColor:'#9ffcff',
        // shadowColor: 'rgba(0,54,255, 1)',
        shadowBlur: 150,
        opcity: 1,
      },
      shading: "realistic",
      label: {
        show: true,
        fontSize: 14,
        color: "rgba(249,252,255,1)",
        fontWeight: 600,
        fontFamily: "Courier New",
      },
      emphasis: {
        label: {
          show: true,
          fontSize: 16,
          color: "rgba(249,252,255,1)",
          fontWeight: 600,
        },
        itemStyle: {
          // color: "#539efe",
          borderWidth: 1,
          borderColor: "rgba(79,220,247,1)",
        },
      },
      groundPlane: false,
      // 将geo3d放在最底层
      zlevel: -1,
    },
    series: series,
  };

  componentProps.options = option;

  // 返回组件属性
  return componentProps;
}

// 组件创建前
async function defineComponentBeforeCreated() {}

// 组件创建后
async function defineComponentCreated({ VueInstance, VueElement }) {}

// 组件销毁
async function defineComponentDestroy() {}

async function handleDataCallback({ ResourceData, VueInstance }) {}
